package com.example.db2.controller;

import com.example.db2.model.Account;
import com.example.db2.service.IAccountService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassDescription:
 * @JdkVersion: 1.8
 * @Author: abp
 * @Created: 2025/3/8 13:18
 */
@RestController
@RequestMapping("/db2")
public class Db2Controller {
    @Resource
    private IAccountService accountService;

    @GetMapping("/account")
    public List<Account> getUsers() {
        return accountService.getAccountList();
    }
}
